package com.tongji.travelplan.unitstub;

import java.util.ArrayList;

import com.tongji.travelplan.beans.ScenicareaBean;
import com.tongji.travelplan.dao.ScenicareaDao;

public class testScenicarea {
	public static void main(String[] args)
	{
		ScenicareaBean scenicareaBean = new ScenicareaBean();
		ArrayList<ScenicareaBean> aList = new ArrayList<ScenicareaBean>();
		ScenicareaDao scenicareaDao = new ScenicareaDao();
		aList = scenicareaDao.getAllScenicarea();
		for(int i = 0; i < aList.size() ; i++)
		{
			scenicareaBean = aList.get(i);
			System.out.println(scenicareaBean.getId()+":"+scenicareaBean.getName()+":"+scenicareaBean.getInfomation());
			System.out.println(scenicareaBean.getCity().getId()+":"+scenicareaBean.getCity().getName()+":"+scenicareaBean.getCity().getInfomation());
			System.out.println(scenicareaBean.getCity().getProvince().getId()+":"+scenicareaBean.getCity().getProvince().getName()+":"+scenicareaBean.getCity().getProvince().getInfomation());		
			System.out.println(scenicareaBean.getCity().getProvince().getCountry().getId()+":"+scenicareaBean.getCity().getProvince().getCountry().getName()+":"+scenicareaBean.getCity().getProvince().getCountry().getInfomation());		
		}
	}
}
